/*
 * MIT License
 *
 * Copyright (c) 2025 Mark·虎
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

package com.hsxxherp.key.common.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 模型： 账户实体
 *
 * @author Mark·虎克（2486970363@qq.com）
 */
@TableName("key_account")
@Schema(name = "KeyAccount", description = "关键账户信息")
public class KeyAccountEntity extends BaseEntity {

    @TableId
    @Schema(description = "用户唯一标识，自增主键，用于唯一标识每个账户记录", example = "123456")
    private String pkAccount;

    @Schema(description = "用户的昵称，最大长度为 50 个字符，用于在系统中显示的名称", example = "张三")
    private String nickname;

    @Schema(description = "用户加密后的密码，最大长度为 255 个字符，保障账户安全", example = "encrypted_password")
    private String password;

    @Schema(description = "用户的邮箱地址，最大长度为 100 个字符，用于接收系统通知等，必须唯一", example = "example@example.com")
    private String email;

    @Schema(description = "用户的手机号码，最大长度为 20 个字符，可为空，用于短信通知等", example = "13800138000")
    private String phone;

    @Schema(description = "标识用户是否绑定了手机号码，0 表示未绑定，1 表示已绑定", example = "true")
    private Boolean isPhoneBound;

    @Schema(description = "标识用户是否绑定了邮箱，0 表示未绑定，1 表示已绑定", example = "true")
    private Boolean isEmailBound;

    @Schema(description = "标识用户是否需要修改密码，0 表示不需要，1 表示需要", example = "false")
    private Boolean needChangePassword;

    @Schema(description = "账户的状态，可根据业务需求自定义状态值，如正常、冻结等", example = "0")
    private Integer status;


    public String getPkAccount() {
        return pkAccount;
    }

    public void setPkAccount(String pkAccount) {
        this.pkAccount = pkAccount;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Boolean getPhoneBound() {
        return isPhoneBound;
    }

    public void setPhoneBound(Boolean phoneBound) {
        isPhoneBound = phoneBound;
    }

    public Boolean getEmailBound() {
        return isEmailBound;
    }

    public void setEmailBound(Boolean emailBound) {
        isEmailBound = emailBound;
    }

    public Boolean getNeedChangePassword() {
        return needChangePassword;
    }

    public void setNeedChangePassword(Boolean needChangePassword) {
        this.needChangePassword = needChangePassword;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


    @Override
    public String toString() {
        return "KeyAccountEntity{" +
                "pkAccount='" + pkAccount + '\'' +
                ", nickname='" + nickname + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", isPhoneBound=" + isPhoneBound +
                ", isEmailBound=" + isEmailBound +
                ", needChangePassword=" + needChangePassword +
                ", status=" + status +
                ", isDeleted=" + isDeleted +
                ", createdTime=" + createdTime +
                ", updatedTime=" + updatedTime +
                ", version=" + version +
                ", creator='" + creator + '\'' +
                ", updator='" + updator + '\'' +
                '}';
    }
}